module.exports = (cli) => {
  cli.injectFeature({
    name: 'Linter / Formatter',
    value: 'linter',
    short: 'Linter',
    description: 'Check and enforce code quality with ESLint or Prettier',
    link: 'https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint',
    plugins: ['eslint'],
    checked: true
  })

  cli.onPromptComplete((answers, options) => {
    if (answers.features.includes('linter')) {
      options.plugins['linter'] = true
    }
  })
}
